{extend name="default/template/base_index"/}

{block name="area_body"}

    {include file="default/Widget/topbar" /}
    <div class="admin-main container-fluid">
        {include file="default/Widget/left" /}
        <div class="admin-main-content">
            {include file="default/Widget/breadcrumb" /}

            <!-- 标题栏 -->
            <h2>钩子列表</h2>

            <div class="cf">
                <?php if (IS_ROOT): ?>
                <a class="btn btn-primary btn-sm" href="{:url('Addons/addhook')}"><i class="fa fa-plus"></i>新 增</a>
                <?php endif ?>
            </div>

            <!-- 数据列表 -->
            <div class="data-table table-striped">
                <table class="table table-striped table-condensed">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>名称</th>
                        <th>描述</th>
                        <th>类型</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="list" id="vo"}
                        <tr>
                            <td>{$vo.id}</td>
                            <td><a href="{:url('Addons/edithook?id='.$vo['id'])}">{$vo.name}</a></td>
                            <td>{$vo.description}</td>
                            <td>{$vo.type_text}</td>
                            <td>
                                <a title="编辑" href="{:url('Addons/edithook?id='.$vo['id'])}">编辑</a>
                                <a class="confirm ajax-get" title="删除"
                                   href="{:url('Addons/delhook?id='.$vo['id'])}">删除</a>
                            </td>
                        </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
            <!-- 分页 -->
            <div class="page">
                {$_page}
            </div>
        </div>
    </div>

{/block}

{block name="area_footer"}
    <script type="text/javascript">
        $(function () {

        })
    </script>
{/block}